<template>
    <div class="user-home">
        <HeaderBar></HeaderBar>
        <div class="user-body">
            <div class="sos">
                <van-button>
                    <template #icon>
                        <i class="iconfont icon-jiuzhu"></i>
                    </template>
                    <span class="main-text">一键求助</span>
                    <span class="sub-text">长按语音输入</span>
                </van-button>
            </div>

            <div class="main-function">
                <van-button icon="plus" type="default">
                    <template #icon>
                        <img src="../assets/药.png" class="btn-icon"> <!-- 医疗图标 -->
                    </template>
                    医疗援助
                </van-button>
                <van-button icon="plus" type="default">
                    <template #icon>
                        <img src="../assets/生活.png" class="btn-icon">
                    </template>
                    生活帮助
                </van-button>
                <van-button icon="plus" type="default">
                    <template #icon>
                        <img src="../assets/情感.png" class="btn-icon">
                    </template>
                    情感支持
                </van-button>
            </div>


        </div>


    </div>
</template>

<script setup>
import HeaderBar from '../components/HeaderBar.vue';
</script>

<style lang="less" scoped>
.user-home {
    height: 100vh;

    .user-body {
        height: calc(100vh - 5.6rem - 7rem);
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;

        .sos {
            width: 34.3rem;
            height: 19.2rem;
            display: flex;
            align-items: center;
            justify-content: center;
            // margin-top: 18.9rem;
            margin-bottom: 5rem;

            :deep(.van-button) {
                width: 19.2rem; // 宽度高度相等
                height: 19.2rem; // 保证正圆形
                padding: 0; // 清除内边距
                min-width: auto; // 覆盖vant默认最小宽度
                border-radius: 50%; // 强制圆形
                background: linear-gradient(180deg, #fd8731 0%, #ffc14c 100%);
                box-shadow: 0px 0px 30px 0px rgba(255, 255, 255, 0.8);

                .van-button__content {
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    flex-direction: column;

                    // width: 100%; // 新增
                    // height: 100%; // 新增
                    .van-button__icon {
                        width: 4.4rem;
                        height: 3.6rem;

                        .icon-jiuzhu {
                            color: #FFFFFF;
                            font-size: 3.8rem;
                        }
                    }

                    .van-button__text {
                        display: flex;
                        flex-direction: column;
                        align-items: center;
                        justify-content: center;

                        .main-text {
                            font-family: Roboto, Roboto;
                            font-weight: 700;
                            font-size: 20px;
                            color: #FFFFFF;
                            line-height: 28px;
                            text-align: center;
                            font-style: normal;
                            text-transform: none;
                        }

                        .sub-text {
                            font-family: Roboto, Roboto;
                            font-weight: 400;
                            font-size: 14px;
                            color: #FFFFFF;
                            line-height: 20px;
                            text-align: center;
                            font-style: normal;
                            text-transform: none;
                        }

                    }
                }
            }
        }

        .main-function {
            display: flex;
            gap: 16px; // 新增间距属性


            :deep(.van-button) {
                width: 10.4rem;
                height: 12.5rem;
                background: #FFFFFF;
                border-radius: 12px 12px 12px 12px;
                box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.1), 0px 1px 2px -1px rgba(0, 0, 0, 0.1);

                .van-button__content {
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    flex-direction: column;

                    .van-button__icon {
                        width: 6.4rem;
                        height: 6.4rem;

                        img {
                            width: 100%;
                        }
                    }

                    .van-button__text {
                        font-family: Roboto, Roboto;
                        font-weight: 400;
                        font-size: 14px;
                        color: #374151;
                        text-align: center;
                        font-style: normal;
                        text-transform: none;
                        margin-top: 0.4rem;
                    }
                }


            }
        }


    }


}
</style>